# Copyright (c) 2017 by Michael Zahniser
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

mission "Drought Relief"
	name "干ばつの救援を<planet>へ"
	job
	repeat
	description "農業の世界である<destination>は、現在干ばつにあっている。その惑星へ、<payment>で <date> までに <cargo>を届けよ。"
	cargo "干ばつ救援物資" 25 2 .05
	deadline
	to offer
		random < 10
	source
		government "Republic"
		not attributes "farming"
	destination
		distance 3 10
		attributes "dirt belt"
		attributes "farming"
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment 10000 160
		dialog "あなたは<commodity>の積み荷を降ろし、<payment>の支払いをうける。<planet>の市民の一団があなたに礼を言い、別れを告げた。"


mission "To Remembrance Day celebration [0]"
	name "追悼記念日の祝典"
	job
	repeat
	description "2 月 19 日におこなわれる追悼記念日の祝典のために、<fare>を<destination>へ <date> までに連れていけ。報酬は <payment>。"
	passengers 4 4 .5
	deadline
	to offer
		or
			and
				random < 20
				month == 12
				day >= 21
			and
				random < 30
				month == 1
			and
				random < 10
				month == 2
				day < 19
	to fail
		month * 100 + day >= 219
	source
		attributes "dirt belt"
	destination
		distance 3 15
		attributes "dirt belt"
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment 1000 180
		dialog "あなたは<passengers>の<planet>での幸運を祈る。子どもたちが顔を緑に塗って船から走りだしていき、親たちがあなたに <payment>支払った。"


mission "To Remembrance Day celebration [1]"
	name "追悼記念日の祝典"
	job
	repeat
	description "2 月 19 日におこなわれる追悼記念日の祝典の準備のために、<cargo>を<destination>へ <date> までに届けよ。報酬は <payment>。"
	cargo random 5 2 .1
	deadline
	to offer
		or
			and
				random < 40
				month == 12
				day >= 21
			and
				random < 60
				month == 1
			and
				random < 20
				month == 2
				day < 19
	to fail
		month * 100 + day >= 219
	source
		attributes "dirt belt"
	destination
		distance 3 15
		attributes "dirt belt"
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment 1000 180
		dialog "宇宙港の港湾労働者は、すでに追悼記念日にあわせた陽気な衣装をしている。その労働者たちがあなたの船から<commodity>の積み荷を片づけ、あなたに <payment>の報酬を手渡した。"

mission "To Remembrance Day celebration [2]"
	name "追悼記念日の祝典"
	job
	repeat
	description "2 月 19 日におこなわれる追悼記念日の祝典の準備のために、<cargo>を<destination>へ <date> までに届けよ。報酬は <payment>。"
	cargo random 5 2 .1
	deadline
	to offer
		or
			and
				random < 40
				month == 12
				day >= 21
			and
				random < 60
				month == 1
			and
				random < 20
				month == 2
				day < 19
	to fail
		month * 100 + day >= 219
	source
		attributes "dirt belt"
	destination
		distance 3 15
		attributes "dirt belt"
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment 1000 180
		dialog "宇宙港の港湾労働者は、すでに追悼記念日にあわせた陽気な衣装をしている。その労働者たちがあなたの船から<commodity>の積み荷を片づけ、あなたに <payment>の報酬を手渡した。"


mission "To Remembrance Day celebration [3]"
	name "追悼記念日の祝典"
	job
	repeat
	description "2 月 19 日におこなわれる追悼記念日の祝典のために、<fare>を<destination>へ <date> までに連れていけ。報酬は <payment>。"
	passengers 20 4 .15
	deadline
	to offer
		random < ( "passenger space" - 30 ) * 2
		or
			and
				random < 20
				month == 12
				day >= 21
			and
				random < 90
				month == 1
			and
				random < 30
				month == 2
				day < 19
	to fail
		month * 100 + day >= 219
	source
		attributes "dirt belt"
	destination
		distance 3 15
		attributes "dirt belt"
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment 200000 120
		dialog "あなたは<passengers>の<planet>での幸運を祈る。子どもたちが顔を緑に塗って船から走りだしていき、親たちがあなたに <payment>支払った。"


mission "From Remembrance Day celebration [0]"
	name "追悼記念日からの帰路"
	job
	repeat
	description "追悼記念日の祝典が終わり、家に帰る <fare>を<destination>まで連れていけ。報酬は <payment>。"
	passengers 4 4 .5
	to offer
		or
			and
				random < 25
				month == 2
				day > 19
			and
				random < 15
				month == 3
			and
				random < 10
				month == 4
				day < 20
	source
		attributes "dirt belt"
	destination
		distance 3 15
		attributes "dirt belt"
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment
		payment 1000
		dialog "乗客は<planet>まで連れかえってくれたことに礼を言い、あなたは <payment>の報酬を受けとった。"


mission "From Remembrance Day celebration [1]"
	name "追悼記念日からの帰路"
	job
	repeat
	description "追悼記念日の祝典が終わり、家に帰る <fare>を<destination>まで連れていけ。報酬は <payment>。"
	passengers 4 4 .3
	to offer
		or
			and
				random < 20
				month == 2
				day > 19
			and
				random < 10
				month == 3
			and
				random < 5
				month == 4
				day < 20
	source
		attributes "dirt belt"
	destination
		distance 3 15
		attributes "dirt belt"
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment
		payment 1000
		dialog "乗客は<planet>まで連れかえってくれたことに礼を言い、あなたは <payment>の報酬を受けとった。"


mission "From Remembrance Day celebration [2]"
	name "追悼記念日からの帰路"
	job
	repeat
	description "追悼記念日の祝典が終わり、家に帰る <fare>を<destination>まで連れていけ。報酬は <payment>。"
	passengers 20 4 .15
	to offer
		random < ( "passenger space" - 30 ) * 2
		or
			and
				random < 60
				month == 2
				day > 19
			and
				random < 30
				month == 3
			and
				random < 15
				month == 4
				day < 20
	source
		attributes "dirt belt"
	destination
		distance 3 15
		attributes "dirt belt"
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment 120000 100
		dialog "乗客は<planet>まで連れかえってくれたことに礼を言い、あなたは <payment>の報酬を受けとった。"


mission "Food Convoy [0]"
	name "食料船団を<planet>へ"
	job
	repeat
	deadline
	description "「<npc>」 の船長は食料を運ぶ小さな船団を率いている。<date> までに<destination>への護衛をしてくれるなら、この船長は <payment>支払おうとしている。"
	to offer
		random < 30
		"combat rating" > 30
	source
		attributes "dirt belt"
	destination
		distance 2 8
		attributes "near earth" "paradise" "core"
	npc
		government "Pirate"
		personality nemesis harvests plunders
			confusion 20
		system destination
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis harvests plunders
			confusion 20
		system destination
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis entering harvests plunders
			confusion 20
		system destination
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
			confusion 20
		system destination
		fleet "Small Northern Pirates" 2
	
	npc accompany save
		government "Merchant"
		personality escort timid
		"cargo settings"
			commodities "Food"
		fleet
			names "civilian"
			variant
				"Freighter" 3
	on complete
		payment 100000
		dialog "「<npc>」 の船長が船団を無事に護衛してくれたことで礼を言い、<payment>支払った。"
	on visit
		dialog phrase "generic arrived-without-npc dialog"


mission "Food Convoy [1]"
	name "食料船団を<planet>へ"
	job
	repeat
	deadline
	description "「<npc>」 の船長は食料を運ぶ船団を率いている。<date> までに<destination>への護衛をしてくれるなら、この船長は <payment>支払おうとしている。"
	to offer
		random < 25
		"combat rating" > 60
	source
		attributes "dirt belt"
	destination
		distance 3 9
		attributes "near earth" "paradise" "core"
	npc
		government "Pirate"
		personality nemesis harvests plunders
		system destination
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis entering harvests plunders
		system destination
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
		system destination
		fleet "Large Northern Pirates"
	
	npc accompany save
		government "Merchant"
		personality escort timid
		"cargo settings"
			commodities "Food"
		fleet
			names "civilian"
			variant
				"Behemoth"
				"Freighter" 2
	on complete
		payment 160000
		dialog "「<npc>」 の船長が船団を無事に護衛してくれたことで礼を言い、<payment>支払った。"
	on visit
		dialog phrase "generic arrived-without-npc dialog"


mission "Food Convoy [2]"
	name "食料船団を<planet>へ"
	job
	repeat
	deadline
	description "「<npc>」 の船長は食料を運ぶ大きな船団を率いている。<date> までに<destination>への護衛をしてくれるなら、この船長は <payment>支払おうとしている。"
	to offer
		random < 15
		"combat rating" > 90
	source
		attributes "dirt belt"
	destination
		distance 4 10
		attributes "near earth" "paradise" "core"
	npc
		government "Pirate"
		personality nemesis harvests plunders
		system destination
		fleet "Small Northern Pirates"
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis entering harvests plunders
		system destination
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
		system destination
		fleet "Small Northern Pirates"
		fleet "Large Northern Pirates"
	
	npc accompany save
		government "Merchant"
		personality escort timid
		"cargo settings"
			commodities "Food"
		fleet
			names "civilian"
			variant
				"Behemoth" 2
	on complete
		payment 220000
		dialog "「<npc>」 の船長が船団を無事に護衛してくれたことで礼を言い、<payment>支払った。"
	on visit
		dialog phrase "generic arrived-without-npc dialog"
